package com.jdrx.ocp.dao;

import com.jdrx.ocp.beans.entity.SettingPO;
import com.jdrx.ocp.beans.entity.util.KeyValue;
import com.jdrx.platform.jdbc.dao.BaseDAO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @Author: Huangxg
 * @Date: 2018/12/7 11:16
 */
@Mapper
public interface SettingDAO extends BaseDAO<SettingPO> {

    /**
     * 根据KEY删除配置项
     * @param key
     * @return
     */
    int deleteByKey(String key);

    /**
     * 根据KEY获取配置
     * @param key
     * @return
     */
    SettingPO getByKey(String key);

    /**
     * 批量更新配置值
     * @param list
     * @return
     */
    int updateBatch(List<KeyValue> list);

}
